package top.tresman.cxxcommon.entity.constants;

import lombok.Getter;

@Getter
public enum ErrorCodeEnum {
    OK(200, "success"),
    BAD_ARGS(10001, "参数错误"),
    PERMISSION_DENIED(10002, "权限不足"),
    REQ_FREQUENT(10003, "请求频繁"),
    CODE_SEND_FAIL(10004, "短信验证码发送失败"),
    DATA_NOT_FOUND(20001, "数据不存在"),
    DATA_INS_ERR(20002, "数据插入失败"),
    DATA_UPD_ERR(20003, "数据更新失败"),
    DATA_DEL_ERR(20004, "数据删除失败"),
    DATA_EXPORT_ERR(20005, "数据导出失败"),
    SYNC_TASK_FAIL(30001, "异步任务失败"),
    INVALID_TOKEN(40001, "登录状态错误"),
    MAINTAIN(50000, "系统维护中"),
    SYS_ERR(50001, "系统错误"),
    API_ERR(90000, "第三方接口错误"),
    ;
    private final Integer code;
    private final String message;

    /**
     * 系统维护中
     */
    ErrorCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
